Add the given days since noon 4713 BC January 1 and returns the Gregorian date.
#include <Date.au3>
_DateToDayValue ($iJulianDate, ByRef $iYear, ByRef $iMonth, ByRef $iDay)
Parameters
$iJulianDate | A valid number of days. |
$iYear | will return the year in format YYYY |
$iMonth | will return the month in format MM |
$iDay | will return the day in format DD |
Return Value
Success: | Returns the date calculate |
Failure: | 0 |
@Error: | 0 = No error. |
1 = Invalid Input number of days |
Remarks
None.
Related
_DateToDayValue, _DateAdd, _DateDiff
Example
#include <Date.au3>
; Julian date of today.
$sJulDate = _DateToDayValue (@YEAR, @MON, @MDAY)
MsgBox(4096, "", "Todays Julian date is: " & $sJulDate)
; 14 days ago calculation.
Dim $Y, $M, $D
$sJulDate = _DayValueToDate ($sJulDate-14, $Y, $M, $D)
MsgBox(4096, "", "14 days ago:" & $M & "/" & $D & "/" & $Y & " (" & $sJulDate & ")")